package com.wcs.db;

import org.apache.commons.dbcp.BasicDataSource;
import javax.sql.DataSource;

/**
 * Created by lyx on 2017/11/25.
 */
public class DBDataSource {

    public static DataSource getDataSource(String connectURI){
        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName("com.mysql.jdbc.Driver");
        ds.setUsername("root");
        ds.setPassword("root");
        ds.setUrl(connectURI);
        return ds;
    }
}
